package com.itheima.zhuangbi;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
/*
越过了泛型
 */
public class Demo01 {

    public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
        ArrayList<String> list = new ArrayList<>();
        list.add("吴亦凡");
        list.add("霍尊");
        //list.add(123);
        Class<? extends ArrayList> clazz = list.getClass();
        Method add = clazz.getMethod("add",Object.class);
        add.invoke(list,123);


        System.out.println(list);
    }
}
